﻿
'*******************************************************************
' Program: Data Center Visio Rack Tool
' Author: Albert E Edlund
' Date:
'
' Purpose:
'
'
'
'*******************************************************************


Imports Microsoft.Practices.EnterpriseLibrary.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging


Imports System
Imports System.ComponentModel
Imports System.Collections.Generic



Public Class dc_SubLocation
    Implements INotifyPropertyChanged


#Region "Events"

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub OnPropertyChanged(ByVal info As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub

#End Region

#Region " Constructor "

    Public Sub New()
        initProperties()
    End Sub

    Public Sub New(ByVal strUserId As String)
        initProperties()
        Me.m_attrlocLastEdit = strUserId
    End Sub

#End Region

#Region " Properties and Fields "

    Private m_attrlocKey As Int32
    Private m_attrlocSiteKey As Int32
    Private m_attrlocName As String
    Private m_attrlocBuilding As String
    Private m_attrlocFloor As String
    Private m_attrlocRoom As String
    Private m_attrlocCloset As String
    Private m_attrlocIntLocation As String
    Private m_attrlocGridHeight As Int16
    Private m_attrlocGridWidth As Int16
    Private m_attrlocGridSize As Int16
    Private m_attrlocPhone As String
    Private m_attrlocComments As String
    Private m_attrlocLastUpdate As Date
    Private m_attrlocLastEdit As String

    Private Const constattrlocKey As Int32 = -1
    Private Const constattrlocSiteKey As Int32 = -1
    Private Const constattrlocName As String = "SubLoc"
    Private Const constattrlocBuilding As String = "na"
    Private Const constattrlocFloor As String = "1"
    Private Const constattrlocRoom As String = "na"
    Private Const constattrlocCloset As String = "na"
    Private Const constattrlocIntLocation As String = "na"
    Private Const constattrlocGridHeight As Integer = -1
    Private Const constattrlocGridWidth As Integer = -1
    Private Const constattrlocGridSize As Integer = 1
    Private Const constattrlocPhone As String = "1-312-555-1212"
    Private Const constattrlocComments As String = "none"
    Private Const constattrlocLastUpdate As Date = #1/1/2001#
    Private Const constattrlocLastEdit As String = "na"

    Public Property attrlocKey() As Int32
        Get
            Return Me.m_attrlocKey
        End Get
        Set(ByVal value As Int32)
            Me.m_attrlocKey = value
            Me.OnPropertyChanged("attrlocKey")
        End Set
    End Property

    Public Property attrlocSiteKey() As Int32
        Get
            Return Me.m_attrlocSiteKey
        End Get
        Set(ByVal value As Int32)
            Me.m_attrlocSiteKey = value
            Me.OnPropertyChanged("attrlocSiteKey")
        End Set
    End Property

    Public Property attrlocName() As String
        Get
            Return Me.m_attrlocName
        End Get
        Set(ByVal value As String)
            Me.m_attrlocName = value
            Me.OnPropertyChanged("attrlocName")
        End Set
    End Property

    Public Property attrlocBuilding() As String
        Get
            Return Me.m_attrlocBuilding
        End Get
        Set(ByVal value As String)
            Me.m_attrlocBuilding = value
            Me.OnPropertyChanged("attrlocBuilding")
        End Set
    End Property

    Public Property attrlocFloor() As String
        Get
            Return Me.m_attrlocFloor
        End Get
        Set(ByVal value As String)
            Me.m_attrlocFloor = value
            Me.OnPropertyChanged("attrlocFloor")
        End Set
    End Property

    Public Property attrlocRoom() As String
        Get
            Return Me.m_attrlocRoom
        End Get
        Set(ByVal value As String)
            Me.m_attrlocRoom = value
            Me.OnPropertyChanged("attrlocRoom")
        End Set
    End Property

    Public Property attrlocCloset() As String
        Get
            Return Me.m_attrlocCloset
        End Get
        Set(ByVal value As String)
            Me.m_attrlocCloset = value
            Me.OnPropertyChanged("attrlocCloset")
        End Set
    End Property

    Public Property attrlocIntLocation() As String
        Get
            Return Me.m_attrlocIntLocation
        End Get
        Set(ByVal value As String)
            Me.m_attrlocIntLocation = value
            Me.OnPropertyChanged("attrlocIntLocation")
        End Set
    End Property

    Public Property attrlocGridHeight() As Integer
        Get
            Return Me.m_attrlocGridHeight
        End Get
        Set(ByVal value As Integer)
            Me.m_attrlocGridHeight = value
            Me.OnPropertyChanged("attrlocGridHeight")
        End Set
    End Property

    Public Property attrlocGridWidth() As Integer
        Get
            Return Me.m_attrlocGridWidth
        End Get
        Set(ByVal value As Integer)
            Me.m_attrlocGridWidth = value
            Me.OnPropertyChanged("attrlocGridWidth")
        End Set
    End Property

    Public Property attrlocGridSize() As Integer
        Get
            Return Me.m_attrlocGridSize
        End Get
        Set(ByVal value As Integer)
            Me.m_attrlocGridSize = value
            Me.OnPropertyChanged("attrlocGridSize")
        End Set
    End Property

    Public Property attrlocPhone() As String
        Get
            Return Me.m_attrlocPhone
        End Get
        Set(ByVal value As String)
            Me.m_attrlocPhone = value
            Me.OnPropertyChanged("attrlocPhone")
        End Set
    End Property

    Public Property attrlocComments() As String
        Get
            Return Me.m_attrlocComments
        End Get
        Set(ByVal value As String)
            Me.m_attrlocComments = value
            Me.OnPropertyChanged("attrlocComments")
        End Set
    End Property

    Public Property attrlocLastUpdate() As Date
        Get
            Return Me.m_attrlocLastUpdate
        End Get
        Set(ByVal value As Date)
            Me.m_attrlocLastUpdate = value
            Me.OnPropertyChanged("attrlocLastUpdate")
        End Set
    End Property

    Public Property attrlocLastEdit() As String
        Get
            Return Me.m_attrlocLastEdit
        End Get
        Set(ByVal value As String)
            Me.m_attrlocLastEdit = value
            Me.OnPropertyChanged("attrlocLastEdit")
        End Set
    End Property


#End Region

#Region " Methods "


    Public Sub initProperties()

        Try

            attrlocKey = constattrlocKey
            attrlocSiteKey = constattrlocSiteKey
            attrlocBuilding = constattrlocBuilding
            attrlocFloor = constattrlocFloor
            attrlocRoom = constattrlocRoom
            attrlocCloset = constattrlocCloset
            attrlocIntLocation = constattrlocIntLocation
            attrlocGridHeight = constattrlocGridHeight
            attrlocGridWidth = attrlocGridWidth
            attrlocGridSize = attrlocGridSize
            attrlocPhone = constattrlocPhone
            attrlocComments = constattrlocComments
            attrlocLastUpdate = Now
            attrlocLastEdit = constattrlocLastEdit

        Catch ex As Exception
            Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "Log Only Policy")
            If (rethrow) Then
                Throw
            End If
        End Try

    End Sub




#End Region


End Class




